﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GsOrganization.TcpPacket
{
    public interface IPacketBase
    {
        public byte[] ToBytes();
    }

    public interface IHeader : IPacketBase
    {
        public const int HeaderLength = 8;
        public ushort CommandId { get; set; }
        public ushort MessageLength { get; set; }
        public int TimeStamp { get; set; }

    }

    public interface IPacket : IPacketBase
    {
        public IHeader Header { get; set; }
        public string PayLoad { get; set; }
    }
    
}
